# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 0
n 0(None)[return GenericPlayerEventHandler.event_action_menu(self, event)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb761eb4c>}
nname: 0
n 0(None)[self.player.action_seek(-10)
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb761edac>}
nname: 0
n 0(None)[self.player.action_seek(30)
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb761edcc>}
nname: 99
n 99(None)[return True
]:
	i: 47(), 76()
	o: 

nname: 76
n 76(None)[self._change_speed(self.backward_steps, self.forward_steps)
]:
	i: 0&24(f)
	o: 99()

nname: 47
n 47(None)[self._change_speed(self.reverse_slow_motion, self.slow_motion, 0)
]:
	i: 0&24(t)
	o: 99()

nname: 0&24
n 0&24(actual_speed == 0 or actual_speed in self.reverse_slow_motion + self.slow_motion)[actual_speed = self.player.speed
]:
	i: 
	o: 47(t), 76(f)

nname: 0&24
n 0&24(None)[actual_speed = self.player.speed
if actual_speed == 0 or actual_speed in self.reverse_slow_motion + self.slow_motion:
	self._change_speed(self.reverse_slow_motion, self.slow_motion, 0)
else:
	self._change_speed(self.backward_steps, self.forward_steps)
return True
]:
	i: 
	o: 

self.nodes: {'0&24': <unpyclib.structure.node instance at 0xb76201cc>}
nname: 99
n 99(None)[return True
]:
	i: 47(), 76()
	o: 

nname: 76
n 76(None)[self._change_speed(self.forward_steps, self.backward_steps)
]:
	i: 0&24(f)
	o: 99()

nname: 47
n 47(None)[self._change_speed(self.slow_motion, self.reverse_slow_motion, 0)
]:
	i: 0&24(t)
	o: 99()

nname: 0&24
n 0&24(actual_speed == 0 or actual_speed in self.reverse_slow_motion + self.slow_motion)[actual_speed = self.player.speed
]:
	i: 
	o: 47(t), 76(f)

nname: 0&24
n 0&24(None)[actual_speed = self.player.speed
if actual_speed == 0 or actual_speed in self.reverse_slow_motion + self.slow_motion:
	self._change_speed(self.slow_motion, self.reverse_slow_motion, 0)
else:
	self._change_speed(self.forward_steps, self.backward_steps)
return True
]:
	i: 
	o: 

self.nodes: {'0&24': <unpyclib.structure.node instance at 0xb762010c>}
nname: 0
n 0(None)[return GenericPlayerEventHandler.event_toggle_menu(self, event)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb761ebcc>}
nname: 0
n 0(None)[self.player.action_info()
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb761ee0c>}
nname: 39
n 39(None)[return True
]:
	i: 18(), 38()
	o: 

nname: 38
n 38(None)[]:
	i: 0(f)
	o: 39()

nname: 18
n 18(None)[AudioEventHandler.event_up(self, event)
]:
	i: 0(t)
	o: 39()

nname: 0
n 0(self.player.playmode != 'track')[]:
	i: 
	o: 18(t), 38(f)

nname: 0
n 0(None)[if self.player.playmode != 'track':
	AudioEventHandler.event_up(self, event)
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb761ee4c>}
nname: 39
n 39(None)[return True
]:
	i: 18(), 38()
	o: 

nname: 38
n 38(None)[]:
	i: 0(f)
	o: 39()

nname: 18
n 18(None)[AudioEventHandler.event_down(self, event)
]:
	i: 0(t)
	o: 39()

nname: 0
n 0(self.player.playmode != 'track')[]:
	i: 
	o: 18(t), 38(f)

nname: 0
n 0(None)[if self.player.playmode != 'track':
	AudioEventHandler.event_down(self, event)
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb761ee2c>}
nname: 6
n 6(None)[__doc__ = '\n    Event manager for Video universe\n    '
forward_steps = f_list(config.HMI_VIDEO['forward'])
backward_steps = f_list(config.HMI_VIDEO['backward'])
slow_motion = f_list(config.HMI_VIDEO['slow'])
reverse_slow_motion = f_list(config.HMI_VIDEO['reverse_slow'])
def event_action_menu(self, event):
	return GenericPlayerEventHandler.event_action_menu(self, event)

def event_left(self, event):
	self.player.action_seek(-10)
	return True

def event_right(self, event):
	self.player.action_seek(30)
	return True

def event_wheel_rwd(self, event):
	actual_speed = self.player.speed
	if actual_speed == 0 or actual_speed in self.reverse_slow_motion + self.slow_motion:
		self._change_speed(self.reverse_slow_motion, self.slow_motion, 0)
	else:
		self._change_speed(self.backward_steps, self.forward_steps)
	return True

def event_wheel_fwd(self, event):
	actual_speed = self.player.speed
	if actual_speed == 0 or actual_speed in self.reverse_slow_motion + self.slow_motion:
		self._change_speed(self.slow_motion, self.reverse_slow_motion, 0)
	else:
		self._change_speed(self.forward_steps, self.backward_steps)
	return True

def event_toggle_menu(self, event):
	return GenericPlayerEventHandler.event_toggle_menu(self, event)

def event_info(self, event):
	self.player.action_info()
	return True

def event_up(self, event):
	if self.player.playmode != 'track':
		AudioEventHandler.event_up(self, event)
	return True

def event_down(self, event):
	if self.player.playmode != 'track':
		AudioEventHandler.event_down(self, event)
	return True

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb7613fcc>}
nname: 0
n 0(None)[al = self.player.active_list
self.player.select(-event.arg['count'], list_name=al)
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7613e2c>}
nname: 0
n 0(None)[al = self.player.active_list
self.player.select(event.arg['count'], list_name=al)
return True
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7613dcc>}
nname: 0
n 0(None)[self.player.action_play()
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7613d6c>}
nname: 6
n 6(None)[__doc__ = '\n    Special event manager for youtube\n    '
def event_up(self, event):
	al = self.player.active_list
	self.player.select(-event.arg['count'], list_name=al)
	return True

def event_down(self, event):
	al = self.player.active_list
	self.player.select(event.arg['count'], list_name=al)
	return True

def event_select(self, event):
	self.player.action_play()

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb7613a0c>}
nname: 0
n 0(None)[from __future__ import absolute_import
import pygui.config as config
from pygui.eventmanager.players import AudioEventHandler, GenericPlayerEventHandler
from peewee.ranges import f_list
class VideoEventHandler(AudioEventHandler):
	__doc__ = '\n    Event manager for Video universe\n    '
	forward_steps = f_list(config.HMI_VIDEO['forward'])
	backward_steps = f_list(config.HMI_VIDEO['backward'])
	slow_motion = f_list(config.HMI_VIDEO['slow'])
	reverse_slow_motion = f_list(config.HMI_VIDEO['reverse_slow'])
	def event_action_menu(self, event):
		return GenericPlayerEventHandler.event_action_menu(self, event)

	def event_left(self, event):
		self.player.action_seek(-10)
		return True

	def event_right(self, event):
		self.player.action_seek(30)
		return True

	def event_wheel_rwd(self, event):
		actual_speed = self.player.speed
		if actual_speed == 0 or actual_speed in self.reverse_slow_motion + self.slow_motion:
			self._change_speed(self.reverse_slow_motion, self.slow_motion, 0)
		else:
			self._change_speed(self.backward_steps, self.forward_steps)
		return True

	def event_wheel_fwd(self, event):
		actual_speed = self.player.speed
		if actual_speed == 0 or actual_speed in self.reverse_slow_motion + self.slow_motion:
			self._change_speed(self.slow_motion, self.reverse_slow_motion, 0)
		else:
			self._change_speed(self.forward_steps, self.backward_steps)
		return True

	def event_toggle_menu(self, event):
		return GenericPlayerEventHandler.event_toggle_menu(self, event)

	def event_info(self, event):
		self.player.action_info()
		return True

	def event_up(self, event):
		if self.player.playmode != 'track':
			AudioEventHandler.event_up(self, event)
		return True

	def event_down(self, event):
		if self.player.playmode != 'track':
			AudioEventHandler.event_down(self, event)
		return True



class YoutubeEventHandler(GenericPlayerEventHandler):
	__doc__ = '\n    Special event manager for youtube\n    '
	def event_up(self, event):
		al = self.player.active_list
		self.player.select(-event.arg['count'], list_name=al)
		return True

	def event_down(self, event):
		al = self.player.active_list
		self.player.select(event.arg['count'], list_name=al)
		return True

	def event_select(self, event):
		self.player.action_play()



]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb760ceac>}
from __future__ import absolute_import
import pygui.config as config
from pygui.eventmanager.players import AudioEventHandler, GenericPlayerEventHandler
from peewee.ranges import f_list
class VideoEventHandler(AudioEventHandler):
	__doc__ = '\n    Event manager for Video universe\n    '
	forward_steps = f_list(config.HMI_VIDEO['forward'])
	backward_steps = f_list(config.HMI_VIDEO['backward'])
	slow_motion = f_list(config.HMI_VIDEO['slow'])
	reverse_slow_motion = f_list(config.HMI_VIDEO['reverse_slow'])
	def event_action_menu(self, event):
		return GenericPlayerEventHandler.event_action_menu(self, event)

	def event_left(self, event):
		self.player.action_seek(-10)
		return True

	def event_right(self, event):
		self.player.action_seek(30)
		return True

	def event_wheel_rwd(self, event):
		actual_speed = self.player.speed
		if actual_speed == 0 or actual_speed in self.reverse_slow_motion + self.slow_motion:
			self._change_speed(self.reverse_slow_motion, self.slow_motion, 0)
		else:
			self._change_speed(self.backward_steps, self.forward_steps)
		return True

	def event_wheel_fwd(self, event):
		actual_speed = self.player.speed
		if actual_speed == 0 or actual_speed in self.reverse_slow_motion + self.slow_motion:
			self._change_speed(self.slow_motion, self.reverse_slow_motion, 0)
		else:
			self._change_speed(self.forward_steps, self.backward_steps)
		return True

	def event_toggle_menu(self, event):
		return GenericPlayerEventHandler.event_toggle_menu(self, event)

	def event_info(self, event):
		self.player.action_info()
		return True

	def event_up(self, event):
		if self.player.playmode != 'track':
			AudioEventHandler.event_up(self, event)
		return True

	def event_down(self, event):
		if self.player.playmode != 'track':
			AudioEventHandler.event_down(self, event)
		return True



class YoutubeEventHandler(GenericPlayerEventHandler):
	__doc__ = '\n    Special event manager for youtube\n    '
	def event_up(self, event):
		al = self.player.active_list
		self.player.select(-event.arg['count'], list_name=al)
		return True

	def event_down(self, event):
		al = self.player.active_list
		self.player.select(event.arg['count'], list_name=al)
		return True

	def event_select(self, event):
		self.player.action_play()



